from python_baway.common.xcommon import sv
import sys

# balls = list(range(1, 9 + 1))
balls = [i for i in range(1, 9 + 1)]
sv(balls)

balls.pop(0)
sv(balls)

balls.remove(5)
sv(balls)

try:
    balls.remove(5)
    sv(balls)
except ValueError as ex:
    print(ex)

del balls[3]
sv(balls)

balls.clear()
sv(balls)

print(flush=True)
print(flush=True, file=sys.stderr)
del balls
# sv(balls)  # NameError: name 'balls' is not defined
